﻿#region zh-CHS 2006 - 2010 DemoSoft 团队 | en 2006-2010 DemoSoft Team

//     NOTES
// ---------------
//
// This file is a part of the MMOSE(Massively Multiplayer Online Server Engine) for .NET.
//
//                              2006-2010 DemoSoft Team
//
//
// First Version : by H.Q.Cai - mailto:caihuanqing@hotmail.com

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

#region zh-CHS 包含名字空间 | en Include namespace
using System;
using Demo.Mmose.Core.Common;
using Demo.Mmose.Core.Entity.Creature;
#endregion

namespace Demo.Mmose.Core.Entity.Suit.Quest
{
    /// <summary>
    /// 
    /// </summary>
    public class Quest
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 
        /// </summary>
        public Quest()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="serial"></param>
        public Quest( Serial serial )
        {
            m_Serial = serial;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties

        #region zh-CHS Serial属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private Serial m_Serial = new Serial();
        #endregion
        /// <summary>
        /// 唯一序列号GUID
        /// </summary>
        public Serial Serial
        {
            get { return m_Serial; }
            set { m_Serial = value; }
        }

        #endregion

        #region zh-CHS QuestTemplate属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private QuestTemplate m_QuestTemplate = null;
        #endregion
        /// <summary>
        /// 任务模板
        /// </summary>
        public QuestTemplate QuestTemplate
        {
            get { return m_QuestTemplate; }
            set { m_QuestTemplate = value; }
        }

        #endregion

        #region zh-CHS Owner属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private Unit m_Owner;
        #endregion
        /// <summary>
        /// 任务拥有者
        /// </summary>
        public Unit Owner
        {
            get { return m_Owner; }
            set { m_Owner = value; }
        }

        #endregion

        #region zh-CHS Consigner属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private Unit m_Consigner;
        #endregion
        /// <summary>
        /// 委托人的ID
        /// </summary>
        public Unit Consigner
        {
            get { return m_Consigner; }
            set { m_Consigner = value; }
        }

        #endregion

        #region zh-CHS Accepter属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private Unit m_Accepter = null;
        #endregion
        /// <summary>
        /// 接受人的ID
        /// </summary>
        public Unit Accepter
        {
            get { return m_Accepter; }
            set { m_Accepter = value; }
        }

        #endregion

        #region zh-CHS QuestStatus属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 
        /// </summary>
        private QuestStatus m_QuestStatus = new QuestStatus();
        #endregion
        /// <summary>
        /// 
        /// </summary>
        public QuestStatus QuestStatus
        {
            get { return m_QuestStatus; }
            set { m_QuestStatus = value; }
        }

        #endregion

        #region zh-CHS TimeLimit属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 任务的时间限制
        /// </summary>
        private TimeSpan m_TimeLimit = TimeSpan.Zero;
        #endregion
        /// <summary>
        /// 任务的时间限制
        /// </summary>
        public TimeSpan TimeLimit
        {
            get { return m_TimeLimit; }
            set
            {
                // 每次设置都产生新的有效时间限制

                m_EndDateTime = DateTime.Now + value;
                m_TimeLimit = value;
            }
        }

        #endregion

        #region zh-CHS EndDateTime属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 任务的结束时间
        /// </summary>
        private DateTime m_EndDateTime = DateTime.MinValue;
        #endregion
        /// <summary>
        /// 任务的结束时间
        /// </summary>
        public DateTime EndDateTime
        {
            get { return m_EndDateTime; }
        }

        #endregion

        #region zh-CHS QuestReward属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 任务的奖励
        /// </summary>
        private QuestReward m_QuestReward = null;
        #endregion
        /// <summary>
        /// 任务的奖励
        /// </summary>
        public QuestReward QuestReward
        {
            get { return m_QuestReward; }
        }

        #endregion

        #region zh-CHS NextQuestId属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 任务的奖励
        /// </summary>
        private long m_NextQuestId = 0;
        #endregion
        /// <summary>
        /// 下一个的任务
        /// </summary>
        public long NextQuestId
        {
            get { return m_NextQuestId; }
        }

        #endregion

        #region zh-CHS CompletedCount属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 是否是可以重复的任务
        /// </summary>
        private bool m_IsRepetitiveQuest = false;
        #endregion
        /// <summary>
        /// 是否是可以重复的任务
        /// </summary>
        public bool IsRepetitiveQuest
        {
            get { return m_IsRepetitiveQuest; }
            set { m_IsRepetitiveQuest = value; }
        }

        #endregion

        #region zh-CHS CompletedCount属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 重复完成任务的次数
        /// </summary>
        private long m_CompletedCount = 0;
        #endregion
        /// <summary>
        /// 重复完成任务的次数
        /// </summary>
        public long CompletedCount
        {
            get { return m_CompletedCount; }
            set { m_CompletedCount = value; }
        }

        #endregion



        #region zh-CHS QuestObjectiveLine属性 | en Public Properties

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// 任务的目标
        /// </summary>
        private QuestObjectiveLine m_QuestObjectiveLine = null;
        #endregion
        /// <summary>
        /// 任务的目标
        /// </summary>
        public QuestObjectiveLine QuestObjective
        {
            get { return m_QuestObjectiveLine; }
            set { m_QuestObjectiveLine = value; }
        }

        #endregion

        #endregion
    }
}
#endregion